package com.x.Part4_抽象类.练习;

/**
 * ClassName: SaralyEmployee
 * Package: IntelliJ IDEA
 * Description:
 * Written by HanXu
 * Create 2024.03.04 21:58
 */
public class SaraliedEmployee extends Employee{

    private double monthlySalary;

    public SaraliedEmployee() {
    }

    public SaraliedEmployee(MyDate birthday, String name, int number, double monthlySalary) {
        super(birthday, name, number);
        this.monthlySalary = monthlySalary;
    }

    public double getMonthlySalary() {
        return monthlySalary;
    }

    public void setMonthlySalary(double monthlySalary) {
        this.monthlySalary = monthlySalary;
    }

    @Override
    public double earnings() {
        return monthlySalary;
    }


    public String toString() {
        return "SaraliedEmployee{" + super.toString()+ '}';
    }
}
